import Vue from 'vue'
import VueRouter from 'vue-router'
import {ipcRenderer} from 'electron'
import Index from '../components/home/index' // 这是你的首页组件
Vue.use(VueRouter)
const routes = [
  {
    path: '/',
    redirect: '',
    component: Index,
    beforeEnter: (to, from, next) => {
      ipcRenderer.send('changeWindowSize', {width: 1000, height: 563})
      console.log('进入主页')
      next()
    }
  }
]
const router = new VueRouter({
  mode: 'history',
  routes
})
export default router
